import type { RouteRecordRaw } from 'vue-router';

const inventoryRoutes: RouteRecordRaw[] = [
  {
    meta: {
      order: 20,
      title: '库存管理',
      icon: 'ion:box-outline',
    },
    name: 'Inventory',
    path: '/inventory',
    component: () => import('#/layouts/basic.vue'),
    children: [
      {
        path: 'warehouse/list',
        name: 'WarehouseList',
        component: () => import('#/views/inventory/warehouse/list.vue'),
        meta: {
          title: '仓库管理',
          icon: 'ion:location-outline',
          sort: 1,
          permission: ['inventory:warehouse:list'],
        },
      },
      {
        path: 'location/list',
        name: 'LocationList',
        component: () => import('#/views/inventory/location/list.vue'),
        meta: {
          title: '库位管理',
          icon: 'ion:grid-outline',
          sort: 2,
          permission: ['inventory:location:list'],
        },
      },
      {
        path: 'inventory/list',
        name: 'InventoryList',
        component: () => import('#/views/inventory/inventory/list.vue'),
        meta: {
          title: '库存信息',
          icon: 'ion:list-outline',
          sort: 3,
          permission: ['inventory:inventory:list'],
        },
      },
      {
        path: 'inventory/summary',
        name: 'InventorySummary',
        component: () => import('#/views/inventory/inventory/summary.vue'),
        meta: {
          title: '库存汇总',
          icon: 'ion:bar-chart-outline',
          sort: 4,
          permission: ['inventory:inventory:summary'],
        },
      },
      {
        path: 'transaction/list',
        name: 'InventoryTransactionList',
        component: () => import('#/views/inventory/transaction/list.vue'),
        meta: {
          title: '库存交易',
          icon: 'ion:swap-horizontal-outline',
          sort: 5,
          permission: ['inventory:transaction:list'],
        },
      },
      {
        path: 'check/list',
        name: 'InventoryCheckList',
        component: () => import('#/views/inventory/check/list.vue'),
        meta: {
          title: '库存盘点',
          icon: 'ion:checkmark-circle-outline',
          sort: 6,
          permission: ['inventory:check:list'],
        },
      },
    ],
  },
];

export default inventoryRoutes;
